import request from "@/utils/request"

export function getBookType() {
    return request({
        method: "get",
        url: '/bookType/getBookType',
    })
}

export function getBookTypes(page, size) {
    return request({
        method: "get",
        url: '/bookType/getBookTypes',
        params: {
            page: page,
            size: size,
        }
    })
}

export function addBookType(periodicalType) {
    return request({
        method: "post",
        url: '/bookType/addBookType',
        params: periodicalType
    })
}

export function deleteBookType(periodicalType) {
    return request({
        method: "delete",
        url: '/bookType/deleteBookType',
        params: periodicalType
    })
}

export function updateBookType(periodicalType) {
    return request({
        method: "post",
        url: '/bookType/updateBookType',
        params: periodicalType
    })
}

export default {
    addBookType, deleteBookType, updateBookType, getBookType, getBookTypes
}
